function addLoadEvent(newFunction) {
    var preFunction = window.onload;
    if (typeof preFunction !== "function") {
        console.log("preFunction !== function");
        window.onload = newFunction;
    } else {
        console.log("preFunction === function");
        window.onload = function () {
            preFunction();
            newFunction();
        };
    }
}